<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>{$title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link href="templates/mattmakins.css" rel="stylesheet" type="text/css" />
<script type="text/javaScript" src="javascript/images.js"></script>
</head>

<body>
<div align="center">
<div id="pageDesign" align="center">

  <div id="banner"></div>
	
  <div id="blogContent">
    {if $loggedIn}
    <br />
    <a href="new.php">New Post</a> | 
    <a href="manageCategories.php">Manage Categories</a> 
    {/if}

	{foreach from=$posts item=post}
	<p class="blogHeader"><a href="view.php?type=article&id={$post.id}">{$post.title}</a></p>
	<p class="blogInfo">Posted by {$post.author} on {$post.date} in {$post.category}</p>
	<p>{$post.message}</p>
	{if $loggedIn}
    <br />
    <a href="new.php?do=edit&id={$post.id}">Edit Post</a> | 
    <a href="delete.php">Delete Post</a> 
    {/if}
	
	{/foreach}
  </div>

  <div class="categoryMenu">
	<ul>
		<li class="categoryHeader">Categories</li>
		<li style="list-style-type: none">&nbsp;</li>
		{foreach from=$categories item=category}
		<li class="categoryItem"><a href="view.php?type=category&id={$category.id}">{$category.title}</a></li>
		{/foreach}
	</ul>
  </div>

  <br/>

  <!-- Footer include -->
  {include file="footer.tpl"}
  
</div>
</div>
</body>
</html>
